<?php
$isReloadable = true;
require_once "../../../pers/inc.config.php";
require_once OVF_FS_WEB_ROOT.'/app/_inc/inc.session.php';
require_once OVF_FS_WEB_ROOT.'/app/_inc/funct.html.php';
require_once OVF_FS_WEB_ROOT.'/app/_inc/class.ovfForm.php';

$oForm = new ovfForm('campagne');

$sSql = "SELECT ".$oForm->getCampiSelect()." from ovf_campagne C WHERE id_camp = ".reqVarInt('idCamp');
$objDB->query($sSql);
if (!$oForm->aCampiDB = $objDB->fetch()) {
	backOnErr("id. errato '".reqVar('idCamp')."'");
}
$oForm->db2form();

$sCmdL = "";
$sCmdL .= "<a class=\"cmd1\" href=\"campPdf.php?idCamp=".reqVar('idCamp')."&$sXSNQS\" target=\"_blank\">"
	."<img src='".OVF_URL_ROOT."/app/_img/ico_pdf.gif' border='0'> pdf</a>\n";
$sCmdR = "";
$sCmdR .= "<a class=\"cmd1\" href=\"campMod.php?id=".reqVar('idCamp')."&$sXSNQS\" >modifica</a>\n";
$sCmdR .= cmdTorna();

testaHtml('Campagne','Visualizza campagna',$msgPag,'rcom');
?>
<table border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
   <tr>
      <td class="cmd1" align="left">
			<? echo  $sCmdL;?>
      </td>
      <td class="cmd1" align="right">
			<? echo  $sCmdR;?>
      </td>
   </tr>
</table>
<?=getHtmlForm('frm1','',array('enctype'=>true));?>
<?=getHtmlHidden('azione','salva');?>
<?=getHtmlHidden('xsn',XSN);?>
<table class="tab1" border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
	<?=getHtmlRigaRif();?>
   <tr>
      <td class="tit1" colspan='20' align='center'>Campagna</td>
   </tr>
<?
echo $oForm->getHtmlCampiView();
?>
</table>
<table border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
   <tr>
      <td class="cmd1" align="right">
         <? echo  $sCmdR;?>
      </td>
   </tr>
</table>
<?
echo "</form>\n";
codaHtml();
exit();
